<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="com.shopping.user.*"%>
<%@  include file="_sessioncheck.jsp" %>


<%
List<User> users = User.getUsers();
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
  <table border="1" align="center">
    <tr>
      <td>ID</td>
      <td>UserName</td>
      <td>Phone</td>
      <td>Addr</td>
      <td>Rdate</td>
      <td>处理</td>
    </tr>
    <%
      for(Iterator<User> it = users.iterator();it.hasNext(); ) {
    	  User u = it.next();
    %>
    
    	  <tr>
    	    <td><%= u.getId() %></td>
    	    <td><%= u.getUsername() %></td>
    	    <td><%= u.getPhone() %></td>
    	    <td><%= u.getAddr() %></td>
    	    <td><%= u.getRdate() %></td>
    	    <td><a href="delete.jsp?id=<%= u.getId() %>" target="detail">删除</a></td>
    	  </tr>
    <%
      }
    %>
  </table>
</body>
</html>